package org.dolphin.base.json;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.dolphin.base.constant.Status;

public class StatusBean implements Serializable {
  private static final long serialVersionUID = 6240895012676019908L;
  private Status status = Status.SUCCESS;
  private List<String> errors = new ArrayList<String>(1);
  private Map<String, Serializable> attrs = new HashMap<String, Serializable>(1);

  public void addAttr(String key, Serializable value) {
    attrs.put(key, value);
  }

  public void addError(String error) {
    errors.add(error);
  }

  public Map<String, Serializable> getAttrs() {
    return attrs;
  }

  public List<String> getErrors() {
    return errors;
  }

  public Status getStatus() {
    return status;
  }

  public void setAttrs(Map<String, Serializable> attrs) {
    this.attrs = attrs;
  }

  public void setErrors(List<String> errors) {
    this.errors = errors;
  }

  public void setStatus(Status status) {
    this.status = status;
  }
}
